package bussinessService.impl;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import module.Phones;
import bussinessService.phonesBussinessService;
import domain.vo.PhoneVO;
import domain.vo.queryObject;
/**
 * 
* @ClassName: PhonesBussinessServiceImpl
* @Description:客户电话业务层实现类
* @author chenchao
* @date 2013-10-31 上午07:37:06
*
 */
public class PhonesBussinessServiceImpl implements phonesBussinessService{

	public void deleteT(int id) throws SQLException {
		// TODO Auto-generated method stub
		
	}

	/* (non-Javadoc)
	 * @see bussinessService.basicbussinessService#deleteT(java.lang.Object)
	 */
	public void deleteT(Phones t) throws SQLException {
		// TODO Auto-generated method stub
		
	}

	/* (non-Javadoc)
	 * @see bussinessService.basicbussinessService#getAll()
	 */
	public List<PhoneVO> getAll() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see bussinessService.basicbussinessService#getById(java.lang.String)
	 */
	public Phones getById(String id) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see bussinessService.basicbussinessService#merageObject(java.lang.Object)
	 */
	public void merageObject(Phones phones) throws SQLException {
		phonesService.insertObject(phones);
		
	}

	public int countByQueryObject(queryObject queryObject) {
		// TODO Auto-generated method stub
		return 0;
	}

	public List<PhoneVO> getObjectByQueryObject(queryObject queryObject) throws SQLException {
		List<PhoneVO> vos = new ArrayList<PhoneVO>();
		List<Phones> phones =  new ArrayList<Phones>();
		
		phones = phonesService.getObjectByQueryObject(queryObject);
		for (Phones p : phones) {
			PhoneVO vo = new PhoneVO();
			vo.setPhone(p.getPhone());
			vos.add(vo);
		}
		
		return vos;
	}

}
